/*
 * @描述: 
 * @创建者: kilomChou
 * @Date: 2021-04-11 17:02:43
 * @最后编辑: kilomChou
 * @LastEditTime: 2021-05-05 16:12:52
 */
import { getArgs } from "k-args";
import TsKprotoBuilder from "./builder/TsKprotoBuilder"
import path from "path"

let { i: inputDir, o: outputDir } = getArgs();

if (inputDir && outputDir) {
    inputDir = path.resolve(inputDir);
    outputDir = path.resolve(outputDir);
    console.log(`[协议目录]：${inputDir}`);
    console.log(`[代码导出目录]：${outputDir}`);
    console.log("=== 开始构建协议 ===");
    console.log("........................");
    new TsKprotoBuilder(inputDir, outputDir).build();
    console.log("........................");
    console.log("=== 构建完成 ===");
} else {
    console.log("请输入协议目录和代码导出目录");
}